const morgan = require('koa-morgan')
const fs = require('fs')
const path = require('path')

// 创建文件日志流
const accessLogStream = fs.createWriteStream(
  path.join(__dirname, 'logs/access.log'),
  { flags: 'a' }
)
// console.log(accessLogStream)
module.exports = morgan('combined', { stream: accessLogStream })

